package com.kqb.api.product.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;

/**
 * @author 杉果树皮
 * @date 2025/4/13 15:20
 * @description: 订单商品参数
 */
@Data
@Accessors(chain = true)
@ApiModel("订单商品参数")
public class OrderItemDTO {

    @NotNull(message = "产品ID不能为空")
    @ApiModelProperty(value = "产品ID", required = true)
    private Long spuId;

    @NotNull(message = "skuId不能为空")
    @ApiModelProperty(value = "skuId", required = true)
    private Long skuId;

    @NotNull(message = "产品数量不能为空")
    @Min(value = 1, message = "产品数量不能为空")
    @ApiModelProperty(value = "产品数量", required = true)
    private Integer prodCount;

    @NotNull(message = "店铺id不能为空")
    @ApiModelProperty(value = "店铺id", required = true)
    private Long shopId;


}
